﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tauren.Business.DLL.PermissionDLL
{
    public interface IPermissionBusiness : Base.IBaseDLL
    {
        /// <summary>
        /// 新增数据
        /// </summary>
        /// <returns></returns>
        long Add(Entity.Model.Permission data);

        /// <summary>
        /// 修改数据
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        bool Edit(Entity.Model.Permission data);

        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="AutoId"></param>
        /// <returns></returns>
        bool Delete(long AutoId);

        /// <summary>
        /// 添加多语言
        /// </summary>
        /// <param name="res"></param>
        /// <returns></returns>
        bool Add(List<Entity.Model.PermissionRes> res);

        /// <summary>
        /// 添加权限对应的操作
        /// </summary>
        /// <param name="res"></param>
        /// <returns></returns>
        bool Add(List<Entity.Model.ButtonsPermission> opertions, long PermissionId);

        /// <summary>
        /// 获取多语言及主数据
        /// </summary>
        /// <param name="AutoId"></param>
        /// <returns></returns>

        List<Entity.Output.PermissionTable> Get(long AutoId);

        /// <summary>
        /// 判断权限编码是否重复
        /// </summary>
        /// <param name="AutoId"></param>
        /// <param name="PerCode"></param>
        /// <returns></returns>
        bool IsPermissionCodeRepeat(long AutoId, string PerCode);

        /// <summary>
        /// 获取序号
        /// </summary>
        /// <returns></returns>
        double GetSeq();

        /// <summary>
        /// 获取单个数据
        /// </summary>
        /// <param name="AutoId"></param>
        /// <returns></returns>
        Entity.Model.Permission FristDefault(long AutoId);

        /// <summary>
        /// 分页获取权限信息
        /// </summary>
        /// <param name="queryModel"></param>
        /// <param name="Total"></param>
        /// <returns></returns>
        List<Entity.Output.PagePermissionTable> Pages(Entity.Global.QueryModel queryModel, out long Total);
        List<Entity.Output.ButtonsPermission_OutPut> GetButtons(long PermissionId);
    }
}
